home *** CD-ROM | disk | FTP | other *** search
- NAME
-
- Files -- a flexible file/directory listing tool.
-
- USAGE
-
- FILES [pathname] [/F|D] [/S] [/X string]
-
- DESCRIPTION
-
- FILES with no arguments will list all the files (including directories and
- hidden and system files) in the current directory. Each file will be listed
- in the following (default) format:
-
- <filename> <date> <time> <attributes> <size> <volume>
-
- The "pathname" argument can be a full MSDOS path with a wildcarded file name.
- If no pathname is given the default is "*.*".
-
- The "/F" or "/D" switches control the types of files found. With the "/F"
- option only files (no directories) will be listed. With the "/D" option only
- the files and directories that would be found with the MSDOS DIR command will
- be listed (no system or hidden files).
-
- The "/S" option specifies that all subdirectories below the given path should
- also be searched for files matching the specified filename.
-
- The "/X" option is followed by a string that will be expanded for each file
- found. The string may contain special character combinations that will be
- expanded, similar to the MSDOS PROMPT command. The special character
- combinations consist of a dollar sign ($) followed by one of the following
- characters:
-
- $ - the '$' character
- t - the time the file was last written
- d - the date the file was last written
- p - the path to the directory the file is in
- g - the '>' character
- l - the '<' character
- b - the '|' character
- f - the file name
- a - the file attribute
- 0 - the low word of the file size (in hex)
- 1 - the high word of the file size (in hex)
- k - the file size (in Kbytes)
- v - the volume label
-
- The default string is '$f $d $t $a $k $v $p'.
-
- The file attribute field consists of six characters, one character for each
- attribute. If an attribute is reset then it is represented by a dash (-).
- The attributes that are set are represented by:
-
- r - read only
- h - hidden
- s - system
- v - volume label
- d - directory
- a - archive
-
-
- EXAMPLES
-
- > FILES
- -- will list all entrys in the current directory
-
- > FILES /bin/src/*.pas
- -- will list all files in the directory "/bin/src" with the extension
- -- ".pas"
-
- > FILES /bin/*.p /s
- -- will list all files with the ".p" extension in "/bin" or any
- -- directory below "/bin"
-
- > FILES c:/*.bak /s /x del $p$f >delbaks.bat
- -- will list all files with the ".bak" extension in any directory on
- -- disk "c:" and produce a string of the form "del <path><file>" of
- -- every file found. The output is redirected into the file
- -- "delbaks.bat". (The batch file could be used to delete all .BAK
- -- files on the disk).
-
- > FILES *.def /x .include $f | sort | pp >prn
- -- will produce a list of ".include" commands that is sorted and passed
- -- to a print utility which interprets the commands and writes the
- -- resulting file to the printer. The net result is a formatted listing
- -- of the contents of all the .DEF files in alphabetical order.